<template>
    <section class="application-partner-main base-main bgcFFF">
      <van-field
        v-model="area"
        label="区域"
        placeholder="请输入区域"
      />
      <van-field
        v-model="shopname"
        label="店名"
        placeholder="请输入店名"
      />
        <van-field
          v-model="username"
          label="用户名"
          placeholder="请输入用户名"
        />
      <van-radio-group class="sex" v-model="sex">
        <van-cell title="性别" >
          <van-radio name="1">男</van-radio>
          <van-radio name="2">女</van-radio>
        </van-cell>
        <p class="line">
          <span></span>
        </p>
      </van-radio-group>
        <van-field
          v-model="phone"
          label="手机号"
          placeholder="请输入手机号"
          @blur="verifyPhone"
        />

      <p class="btn">
        <span class="text-c" @click="handleSub">提交</span>
      </p>

      <p class="explain-text fs13 color7A7B82 pdlr15">说明：申请合伙人请填写真实信息，资料提交后不可修改。 请耐心等待审核确认。</p>

    </section>
</template>

<script type="text/ecmascript-6">
  import { areaList } from '../../assets/js/area'

  export default {
    data() {
      return {
        area:'',
        shopname:'',
        username:'',
        sex:'1',
        phone:'',
      }
    },
    methods: {
      verifyPhone(){
        let regex = new RegExp("^[1][3,4,5,7,8,9][0-9]{9}$");
        let res = regex.test(this.phone);
        if (this.phone === null || this.phone == '') {
          this.$toast('联系电话不能为空');
        } else if (!res) {
          this.$toast('请正确填写联系电话');
        }
      },
      handleSub(){

      },
    },
  }
</script>

<style scoped lang="scss">
  @import '../../assets/css/applicationPartner.scss';
</style>
